from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import ExperimentPlanViewSet

# 创建路由器
router = DefaultRouter()
router.register(r'experiment-plans', ExperimentPlanViewSet, basename='experiment-plan')

urlpatterns = [
    path('api/', include(router.urls)),
]

# API端点说明：
# 试验计划：
# GET /api/experiment-plans/ - 获取试验计划列表
# POST /api/experiment-plans/ - 创建试验计划
# GET /api/experiment-plans/{id}/ - 获取试验计划详情
# PUT /api/experiment-plans/{id}/ - 更新试验计划
# DELETE /api/experiment-plans/{id}/ - 删除试验计划
# GET /api/experiment-plans/gantt_data/ - 获取甘特图数据
# POST /api/experiment-plans/sync_from_scheduling_system/ - 从调度系统同步数据
# POST /api/experiment-plans/sync_from_dingtalk/ - 从钉钉同步数据
# PATCH /api/experiment-plans/{id}/update_dates/ - 更新试验时间